﻿<UserControl x:Class="MusicExplorer.View.DetailTree"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" DataContext="{Binding DetailTree}"
             Width="Auto" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
             >
    
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/Skins/DetailTreeSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    
    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
        <StackPanel Orientation="Vertical">
            <StackPanel.Background>
                <SolidColorBrush>
                    <SolidColorBrush.Color>
                        <Color A="255" R="250" G="250" B="250" />
                    </SolidColorBrush.Color>
                </SolidColorBrush>
            </StackPanel.Background>
            <Expander IsExpanded="True" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
                      FontFamily="Helvetica" FontSize="14" FontWeight="Bold" Width="200">
                <Expander.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Groups" VerticalAlignment="Center" Width="117" />
                        <Button Content="Manage" HorizontalAlignment="Right" FontWeight="Normal" Command="{Binding OpenGroupPreferences}" />
                    </StackPanel>
                </Expander.Header>
                <ListBox ItemsSource="{Binding SelectedWebRepository.Groups}" Style="{StaticResource DetailTreeList}" SelectedItem="{Binding SelectedGroup}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding DisplayName}" FontWeight="Normal" MouseWheel="TextBlock_MouseWheel_1" />
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Expander>
            <Expander IsExpanded="True" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
                      FontFamily="Helvetica" FontSize="14" FontWeight="Bold" Width="200">
                <Expander.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Artists" VerticalAlignment="Center" Width="117" />
                        <Button Content="Manage" HorizontalAlignment="Right" FontWeight="Normal" Command="{Binding OpenArtistPreferences}" />
                    </StackPanel>
                </Expander.Header>
                <ListBox ItemsSource="{Binding SelectedWebRepository.Artists}" Style="{StaticResource DetailTreeList}" SelectedItem="{Binding SelectedArtist}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding DisplayName}" FontWeight="Normal" />
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </Expander>
        </StackPanel>
    </ScrollViewer>

</UserControl>
